The present invention relates generally to managing data and, more specifically, to managing data in a queue.
Commonly, pointers and registers keep track of the next available write location in a memory queue. However, various current queue mechanisms including first-in first-out (FIFO) queues experience disadvantages, such as using too many pointers and/or registers, allowing the data to be written only sequentially, etc. Therefore, it is desirable that mechanisms be provided to solve the above deficiencies and related problems.
The present invention, in various embodiments, provides techniques for managing data in a queue. In one embodiment, two write pointers control writing into a memory queue and one read pointer control reading from the queue. Individual entries written into the queue may complete out-of-order and depend on various conditions such as whether the pointer associated with the entries is active or passive, whether the other pointer is tracking a transaction, whether the active pointer is lower, equal to, or higher than the inactive pointer, whether the data is the last data piece of a transaction, etc. Data read from the queue is in the order of the transaction headers written into the queue. The data may bypass the queue, i.e., the data is not written into the queue, but is loaded directly to an output register.